
cc.Class({
    extends: cc.Component,

    properties: {
        Num_Labels:{
            default:[],
            type:cc.Label
        }
    },

    // LIFE-CYCLE CALLBACKS:

     onLoad () {
         this.roomIdString = '';
     },

    buttonClick(event,customData){
        console.log(customData);
    if(customData == 'exit'){
     this.node.destroy();   
    }else if(customData == 'clear'){
        this.roomIdString = '';
    }else if(customData == 'back'){
        this.roomIdString = this.roomIdString.substring(0,this.roomIdString.length -1);
    }else if(this.roomIdString.length < 6){
        this.roomIdString += customData;
    }
    if(customData >= 6){
        console.log('加入房间');
    }
    for (let i = 0; i < this.Num_Labels.length; i++) {
        this.Num_Labels[i].string = this.roomIdString[i]==null?'':this.roomIdString[i];
    }
    }

    //  update (dt) {
        
    //  },
});
